//@ts-ignore
import request from '@/utils/request';
//@ts-ignore
import {
  userAdressListRequestData,
  ResponseData,
  userDelateAdressRequestData,
  userAddAdressRequestData,
  userUpdateAdressRequestData
} from "@/api/adress/type";

/**
 * 地址接口集合
 */
enum API {
  USERADRESS_LIST_URL = '/adress/list/page',
  ADDUSERADRESS_URL = '/adress/add',
  UPDATEUSERADRESS_URL = '/adress/delete',
  DELATEUSERADRESS_URL = '/adress/update',
}

export const reqUserAdressList = (data: userAdressListRequestData) =>
    request.post<any, ResponseData>(API.USERADRESS_LIST_URL, data)

export const reqAddUserAdress = (data: userAddAdressRequestData) =>
    request.post<any, ResponseData>(API.ADDUSERADRESS_URL, data)

export const reqDelateUserAdress = (data: userDelateAdressRequestData) =>
    request.post<any, ResponseData>(API.UPDATEUSERADRESS_URL, data)
export const reqUpdateUserAdress = (data: userUpdateAdressRequestData) =>
    request.post<any, ResponseData>(API.DELATEUSERADRESS_URL, data)




